import { Module } from '@nestjs/common';
import { WinstonModule } from 'nest-winston';
import {
  consoleTransports,
  createDailyRotateTransport,
} from './createRotateTransport';

@Module({
  imports: [
    WinstonModule.forRoot({
      transports: [
        consoleTransports,
        createDailyRotateTransport('info', 'application'),
        createDailyRotateTransport('warn', 'error'),
      ],
    }),
  ],
  providers: [],
  exports: [],
})
export class LoggerModule {}
